package com.zxy.ziems.server.alarm.service.impl;

import com.zxy.ziems.server.alarm.convertor.AlarmConvertor;
import com.zxy.ziems.server.alarm.mapper.AlarmProcessRecordMapper;
import com.zxy.ziems.server.alarm.pojo.dto.AlarmProcessRecordDTO;
import com.zxy.ziems.server.alarm.pojo.entity.AlarmProcessRecordEntity;
import com.zxy.ziems.server.alarm.service.AlarmProcessRecordService;
import com.zxy.ziems.server.mybatis.core.service.ServiceImplX;
import org.springframework.stereotype.Service;

/**
 * 告警记录处理
 * @author chdzq
 * @create 2023/4/13
 */
@Service
public class AlarmProcessRecordServiceImpl extends ServiceImplX<AlarmProcessRecordMapper, AlarmProcessRecordEntity> implements AlarmProcessRecordService {
    @Override
    public AlarmProcessRecordEntity add(AlarmProcessRecordDTO dto) {
        AlarmProcessRecordEntity entity = AlarmConvertor.INSTANCE.processRecordDTOConvertor2DO(dto);
        save(entity);
        return entity;
    }
}
